package com.nbcio.pm.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.nbcio.common.tenant.core.TenantEntity;
import com.nbcio.pm.domain.vo.PmTeamVo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 团队对象 pm_team
 *
 * @author nbacheng
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pm_team")
@AutoMapper(target = PmTeamVo.class, reverseConvertGenerate = false)
public class PmTeam extends TenantEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 团队ID
     */
    @TableId(value = "team_id", type = IdType.AUTO)
    private Long teamId;

    /**
     * 团队名称
     */
    @TableField("team_name")
    private String teamName;

    /**
     * 团队编码
     */
    @TableField("team_code")
    private String teamCode;

    /**
     * 团队描述
     */
    @TableField("team_description")
    private String teamDescription;

    /**
     * 团队负责人ID
     */
    @TableField("team_leader_id")
    private Long teamLeaderId;

    /**
     * 团队状态（0正常 1停用）
     */
    @TableField("team_status")
    private String teamStatus;

    /**
     * 团队类型（project-项目团队，department-部门团队）
     */
    @TableField("team_type")
    private String teamType;

    /**
     * 上级团队ID
     */
    @TableField("parent_team_id")
    private Long parentTeamId;

    /**
     * 显示顺序
     */
    @TableField("sort_order")
    private Integer sortOrder;

    // 关联字段（非数据库字段）
    @TableField(exist = false)
    private String teamLeaderName;

    @TableField(exist = false)
    private String parentTeamName;
}
